Set
A set is a collection of distinct,symbols unordered objects. Sets are typically collections of numbers, though a set may contain any type of data (including other sets).The objects in a set are called the members of the set or the elements of the set. A set should satisfy the following: 1) The members of the set should be distinct.(not be repeated) 2) The members of the set should hi well-defined.(well-explained) Set notation Sets are notated using french braces {,,, ,,, ,,, } with delimited by commas. There are three ways to represent a set. * Strict enumeration - each element in a set is explicitly stated (e.g., \{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 \} ). * Pattern enumeration - sets with elements following a clear pattern can be shortened from strict enumeration by only showing enough elements to describe the pattern and representing the rest with an ellipsis (e.g., \{ 1, 2, 3 ... 10 \} ). * Set former (or set builder)- elements in a set are defined as a function of one or more variables in a given domain that meets a condition. The presence of a condition is optional. Some syntaxes and variations for a set former are as follows: ** \{ \mbox{function} : \mbox{variable domain } | \mbox{ condition} \} For example, \{ x : 1 \le x \le 10 | x \mbox{ is an integer} \} defines the set of integers 1 through 10. ** \{ f\left(x\right) | P\left(x\right) \} , given a function f and predicate P , the set of all values f\left(x\right) for which P\left(x\right) is true. ** \{ x \in S | P\left(x\right) \} , given a set S and predicate P , a subset of all x in S for which P\left(x\right) is true. Set properties and operations Several properties and operations have been defined for sets. For the purpose of this section, sets are assumed to be collections of numbers. Set P is defined as the set \{1, 2, 3 ... 10\} . Properties * An object is an element of a set when it is contained in the set. For example, 1 is an element of P . This is written as 1 \in P . Similarly, the fact that 11 is not an element of P is written as 11 \notin P . The universe (usually represented as U ) is a set containing all possible elements, while the empty set or null set (represented as \varnothing or \{\} ) is a set containing no elements. * The cardinality of a set is the number of elements in the set. The cardinality of P (written as \#P or \left|P\right| ) is 10. * The complement of a set is the set containing all elements of the universe which are not elements of the original set. For example, if the universe is defined as \{x : 1 \le x \le 20 | x \mbox{ is an integer}\} , then the complement of P with respect to U (written as P^c ) is \{11, 12, 13 ... 20\} . The licardinalities of a set and its complement together equal the cardinality of the universe. Thus, the universe and the null set are complements of each other. * A set is a subset of another set when all the elements in the first set are also a member of the second set. Given sets A and B , A is a subset of B , notated as A \subseteq B , if and only if for all x , x \in A implies x \in B . All sets are subsets of the universe. By definition, all sets are subsets of themselves and by convention, the null set is a subset of all sets. For example, \{1, 2, 3\} \subseteq P . Any given set S has 2^{\left|S\right|} subsets. * Two sets are equal if they are subsets of each other. * A set's proper subsets are all subsets except the set itself. This relationship is notated by A \subset B Operations * The union of two sets is the set containing all elements of either A or B , including elements of both A and B . This operation is written as A \cup B . For example, \{1, 2, 3\} \cup \{2, 3, 4\} = \{1, 2, 3, 4\} . * The intersection of two sets is the set containing all elements of both A and B . This is written as A \cap B . For example, \{1, 2, 3\} \cap \{2, 3, 4\} = \{2, 3\} . The sum of the cardinalities of the intersection and union of two sets is equal to the sum of the cardinalities of the two sets. Other functions on sets Some functions on sets return a set which may not necessarily be a subset of the universal set. Given sets R and S : * The Power set of S , denoted \mathcal{P}\left(S\right) , is the set containing all subsets of S . * The Cartesian product of R and S , denoted R \times S , is the set of ordered pairs \left(r,s\right) where r \in R and s \in S . That is, R \times S = \{\left(r,s\right)|r \in R \mbox{ and } s \in S\} . See also * Relation * Function * Tuple * Multiset Category:Set theory Category:Foundations Category:Relations